package com.anxin.registerManagement.bean.persist;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author 叶前呈
 * @date 2022/2/20 14:21
 */
@Data
@ApiModel("贴吧类")
public class PostBar {

    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("标题")
    @NotBlank(message = "标题不能为空")
    private String title;

    @ApiModelProperty("楼主")
    private Integer landlordId;

    @ApiModelProperty("点赞数目")
    private Integer likeCount;

    @ApiModelProperty("浏览数量")
    private Integer pageViewCount;

    @ApiModelProperty("评论数量")
    private Integer commentCount;

    @ApiModelProperty("是否置顶")
    private Boolean isTop;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

}
